<template>
    <div class="mytreatment">
        <div class="record">
            <h4>问诊记录</h4>
        </div>
        <div>
            <el-table :data="myReserveList" style="width: 100%;font-size: 13px;">
                <el-table-column prop="petName" label="宠物名字" width="">
                </el-table-column>
                <el-table-column prop="userName" label="医生名">
                </el-table-column>
                <el-table-column prop="diseaseAnalysis" label="症状描述">
                </el-table-column>
                <el-table-column prop="treatmentPlan" label="治疗方案">
                </el-table-column>
                <el-table-column prop="createTime" label="就诊时间">
                    
                </el-table-column>
            </el-table>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            myReserveList: []
        }
    },
    created() {
        this.getMyReserveList()
    },
    methods: {
        getMyReserveList() {
            //根据客户id获取问诊记录数据
            var customerId = JSON.parse(localStorage.getItem("customer")).id
            this.request.get("/diagnosis/pageByCustomerId", {
                params: {
                    customerId: customerId,
                    page: 1,
                    pageSize: 6,
                }
            }).then(res => {
                console.log("当前数据====>", res)
                this.myReserveList = res.data.records
                this.total = res.data.total
            })

        }
    },
}
</script>

<style lang="less" scoped>
.mytreatment {
    padding: 0;

    .record {
        height: 40px;
        border-bottom: 1px solid gray;
    }
}
</style>